import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { View, Text, StyleSheet } from 'react-native'
import moment from 'moment'
import screen from '../../../../utils/screen'

export default class extends PureComponent {
  static propTypes = {
    zi: PropTypes.any,
    chou: PropTypes.any,
    yin: PropTypes.any
  }
  render() {
    const { zi, chou, yin } = this.props;
    return (
      <View style={styles.container}>
        <View style={styles.inner}>
          <Text style={styles.zi}>{zi}</Text>
          <Text style={styles.chou}>{chou}</Text>
          <Text style={styles.yin}>数据已更新到北京时间: { yin }</Text>
        </View>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    height: screen.pxToDp(250),
    backgroundColor: 'white'
  },
  inner: {
    flex: 1,
    paddingVertical: screen.pxToDp(25),
    justifyContent: 'space-between',
    alignItems: 'center'
  },
  zi: {
    fontSize: screen.pxToDp(36),
    color: '#636363'
  },
  chou: {
    fontSize: screen.pxToDp(72),
    color: '#ff0000'
  },
  yin: {
    fontSize: screen.pxToDp(20),
    color: '#7a7a7a'
  }
})
